# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=harminv
pkgver=1.4.2
pkgrel=1
pkgdesc="Free program to solve the problem of harmonic inversion"
url="https://github.com/NanoComp/harminv"
arch="all"
license="GPL-2.0-or-later"
depends_dev="openblas-dev>=0.3.0"
makedepends="$depends_dev gfortran"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="harminv-$pkgver.tar.gz::https://github.com/NanoComp/harminv/releases/download/v$pkgver/harminv-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static \
		--enable-shared
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
965c62970b66832877e9d17ee7ac67f1e2bba8efbd5aa431f17602d452fa0323a67c3f8f02c93606dc7cca160cdc335251f62903f44723d079378a7cd0a059ee  harminv-1.4.2.tar.gz
"
